package com.holly.common_view.utils;

import android.content.Context;
import android.net.ConnectivityManager;


/**
 * 判断网络情况
 */
public class TDevice {
    public static boolean hasInternet(Context context) {
        boolean flag=false;
        flag = ((ConnectivityManager) context.getSystemService(
                Context.CONNECTIVITY_SERVICE)).getActiveNetworkInfo() != null;
        return flag;
    }

}
